package com.sen.common.utils.net;

/**
 * @author sen
 */
public class MockClass {
	private static final String CONST = "const";
	
	private String str;
	private int i = 1;
	private Long l = 0L;
	private Object nul = null;
	
	public String getStr() {
		return str;
	}
	public void setStr(String str) {
		this.str = str;
	}
	public int getI() {
		return i;
	}
	public void setI(int i) {
		this.i = i;
	}
	public Long getL() {
		return l;
	}
	public void setL(Long l) {
		this.l = l;
	}
	public Object getNul() {
		return nul;
	}
	public void setNul(Object nul) {
		this.nul = nul;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + i;
		result = prime * result + ((l == null) ? 0 : l.hashCode());
		result = prime * result + ((nul == null) ? 0 : nul.hashCode());
		result = prime * result + ((str == null) ? 0 : str.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final MockClass other = (MockClass) obj;
		if (i != other.i)
			return false;
		if (l == null) {
			if (other.l != null)
				return false;
		} else if (!l.equals(other.l))
			return false;
		if (nul == null) {
			if (other.nul != null)
				return false;
		} else if (!nul.equals(other.nul))
			return false;
		if (str == null) {
			if (other.str != null)
				return false;
		} else if (!str.equals(other.str))
			return false;
		return true;
	}
}
